import request from "@/utils/request";

// 获取题库管理列表
export function getList(data) {
  return request({
    url: "/api/exam/questionLibrary/getList",
    method: "post",
    data,
  });
}
// 获取题库管理
export function getInfo(id) {
  return request({
    url: `/api/exam/questionLibrary/${id}`,
    method: "get",
  });
}
// 获取题库管理详情
export function getDetail(id) {
  return request({
    url: `/api/exam/questionLibrary/detail/${id}`,
    method: "get",
  });
}
// 删除题库管理
export function Delete(id) {
  return request({
    url: `/api/exam/questionLibrary/${id}`,
    method: "DELETE",
  });
}
// 修改题库管理
export function Update(data) {
  return request({
    url: `/api/exam/questionLibrary/${data.id}`,
    method: "PUT",
    data,
  });
}
// 新建题库管理
export function Create(data) {
  return request({
    url: "/api/exam/questionLibrary",
    method: "post",
    data,
  });
}

// 题库选项查询
export function getSelector(data) {
  return request({
    url: "/api/exam/questionLibrary/Selector",
    method: "GET",
    data,
  });
}

// 题库单选项查询
export function getSingleSelector(data) {
  return request({
    url: "/api/exam/questionLibrary/SingleSelector",
    method: "GET",
    data,
  });
}

// 题库选项查询分页
export function getSelectorPagination(data) {
  return request({
    url: "/api/exam/questionLibrary/SelectorPagination",
    method: "GET",
    data,
  });
}
